<?php
require_once('../auth.php');

?>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


<style type="text/css">
<!--
.style1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #686868;
	text-align:left;
	text-decoration:none;
}
.style1 a { color: #99CC33; }
.news {
	FONT-WEIGHT: normal;
	FONT-SIZE: 20px; 
	COLOR: #203878; 
	FONT-FAMILY: Arial; 
	text-decoration:none;
}
.news a:link {
	font-family: Arial, Helvetica, sans-serif
	font-size: 10px;
		color: #686868;
	text-decoration: none;
	font-weight: normal;
}
-->
</style>


</head>
<body bgcolor="#d5e4cf">
<div style="width:250px; position:relative;">				
<table border="0" width="100%" height="100%">
            <tr>
              <td class="style1"><a href='NewsForm.php'> CLICK to Add News</a><br><br><marquee scrollamount="2" behavior="scroll" direction="up" onMouseOver="stop()" onMouseOut="start()">
<div style="width:200px;">
<?php

$con = mysql_connect("localhost","appma" ,"database");

mysql_select_db("162_appma", $con);

$sql="SELECT * FROM news ORDER BY sno DESC";
if (!$sql)
{
	die('Could Not Complete Please Try Again Later: ' );
}

$result=mysql_query($sql);

while($row = mysql_fetch_array($result))
{
	echo "" . $row['date'] . "<br>";
	echo "<b>" . $row['title'] . "</b><br>";
	echo "" . $row['discription'] . "<br>";
	if(($row['image'])!="")
	{
		echo "<img src=" . $row['image'] . " /><br><br>";
	}
	echo "<a href='delete.php?sno=" . $row['sno'] . "'> CLICK to Delete</a><br><br><br><br><br><br>";
}
echo "<a href='NewsForm.php'> CLICK to Add News</a><br><br><br><br><br><br>";


?>
</div>
</marquee>
				
				
				</td>
              </tr>
              </table>
</div>
</body>
</html>